home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / marxmenu.arc / TYME.MNU < prev    next >
Text File  |  1991-03-27  |  15KB  |  715 lines

  1. Comment
  2. ==========================================================
  3.  
  4. Copyright 1990-91 by Marc Perkel * All right reserved.
  5.  
  6. This file is Computer Tyme's main system menu. It is written not
  7. only to be useful to us but to be an example of what can be done
  8. with MarxMenu.
  9.  
  10. =========================================================
  11. EndComment
  12.  
  13. ;------ Create Variables
  14.  
  15. Var
  16.   VertLine = "┬│││││││││││││││││││││││││││││││││││││││││││││"
  17.   VertLine2 = "││││││││││││││││││││"
  18.   VertLine3 = "┌─┴┴┴┴─┐"
  19.   VertLine4 = "└─┬┬┬┬─┘"
  20.   DefaultChoices = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  21.   ThisDirectory
  22.   MainChoices
  23.   PrintQueueChoices
  24.   PortChoices
  25.   DosChoices
  26.   MaintChoices
  27.   NovUtilChoices
  28.   NovUserChoices
  29.   NovInfoChoices
  30.   MainChoiceMask
  31.   MyServer
  32.   AllUsers
  33.   NetAddress
  34.   Station
  35.   UserName
  36.   BMess
  37.   TitleBackColor
  38.   TitleInsideColor
  39.   UsersRead
  40.  
  41.  
  42. ;----- All environment string access will be the last Shell Environment
  43.  
  44. ShellEnvironment
  45.  
  46. ModifyPath Off
  47. OnScreenOnly
  48.  
  49. MyServer = NovDefaultServer
  50. Station  = Str(NovConnection)
  51. UserName = NovMyLoginName
  52.  
  53. ;------ Read network address
  54.  
  55. NetAddress = NovStationAddress (NovConnection)
  56.  
  57. BMess = 'User: ' + UserName + '  *  Server: ' + MyServer
  58. BMess = BMess + '  *  Address: ' + NetAddress + '  *  Dos: ' + DosVersionString
  59.  
  60. ;------ Select colors and prepare screen
  61.  
  62. SavePosition
  63. OnScreenOnly
  64. TitleBackColor = Brown
  65. TitleInsideColor = Yellow
  66. if ColorScreen
  67.    TextColor Cyan Blue
  68.    ClearScreen 176
  69.    GotoXY 1 25
  70.    TextColor Yellow Mag
  71.    ClearLine
  72.    WriteCenter BMess
  73.    TextColor Blue Green
  74.    GotoXY 4,4
  75.    WriteVertical VertLine2
  76.    GotoXY 5,4
  77.    WriteVertical VertLine2
  78.    GotoXY 6,4
  79.    WriteVertical VertLine2
  80.    GotoXY 7,4
  81.    WriteVertical VertLine2
  82.    GotoXY 74,4
  83.    WriteVertical VertLine2
  84.    GotoXY 75,4
  85.    WriteVertical VertLine2
  86.    GotoXY 76,4
  87.    WriteVertical VertLine2
  88.    GotoXY 77,4
  89.    WriteVertical VertLine2
  90.    GotoXY 2,4
  91.    Write VertLine4
  92.    GotoXY 72,4
  93.    Write VertLine4
  94.    GotoXY 2,24
  95.    Write VertLine3
  96.    GotoXY 72,24
  97.    Write VertLine3
  98.    BoxBorderColor White TitleBackColor
  99.    BoxInsideColor TitleInsideColor TitleBackColor
  100.    ClockColor TitleInsideColor TitleBackColor
  101.    TextColor TitleInsideColor TitleBackColor
  102. else
  103.    ClearScreen 176
  104.    TextColor Black Grey
  105.    GotoXY 1 25
  106.    ClearLine
  107.    ClearLine
  108.    WriteCenter BMess
  109.    BoxBorderColor Black Grey
  110.    BoxInsideColor Black Grey
  111.    ClockColor Black Grey
  112. endif
  113. SingleLineBox
  114. Explode Off
  115. DrawBox 1 1 80 3
  116. GotoXY (51,1)
  117. Write "Computer Tyme Master Menu"
  118. ClockPos 3 2
  119. DoubleLineBox
  120. ResetColors
  121.  
  122. LockWord = ""
  123. BlankTime = 10
  124. UseArrows
  125. ThisDirectory = Path
  126.  
  127. Comment
  128. ==========================================================
  129.  
  130. I have defined a procedure called CenterStretchWindow which takes as
  131. parameters a menu title, array of choices, and the XY coordinants
  132. of the center of the window. CenterStretchWindow then displays all the
  133. choices and numbers them. This method allows me to update the menu
  134. more quickly.
  135.  
  136. ==========================================================
  137. EndComment
  138.  
  139. PrintQueueChoices[1] = 'Dot'
  140. PrintQueueChoices[2] = 'Laser'
  141. PrintQueueChoices[3] = 'Vicki'
  142. PrintQueueChoices[4] = 'Grace'
  143. PrintQueueChoices[5] = 'Nita'
  144. PrintQueueChoices[6] = 'Label'
  145.  
  146. PortChoices[1] = 'Lpt1'
  147. PortChoices[2] = 'Lpt2'
  148. PortChoices[3] = 'Lpt3'
  149.  
  150. ;----- Main Menu
  151.  
  152. MainChoices[1]  = 'Command Line'
  153. MainChoices[2]  = 'Printer Select'
  154. MainChoices[3]  = 'Personal Menu'
  155. MainChoices[4]  = 'Create Disk Menu'
  156. MainChoices[5]  = 'Maintenance Menu'
  157. MainChoices[6]  = 'Format Disk Menu'
  158. MainChoices[7]  = 'Dos Functions'
  159. MainChoices[8]  = 'Novell Utilities'
  160. MainChoices[9]  = 'Novell Information'
  161. MainChoices[10] = 'Novell User Options'
  162.  
  163. MainChoiceMask = DefaultChoices
  164.  
  165. Comment
  166. ==========================================================
  167.  
  168. I have included a sample of how choices can be conditionally deleted
  169. from the men choices. The idea is to delete the choice from the
  170. selection array, and to insert a null character into MainChoiceMask at
  171. the position of the deleted choice. I recommend that choices be
  172. deleted from the end first working back to the beginning.
  173.  
  174. ==========================================================
  175. EndComment
  176.  
  177. if UserName <> 'MARC'
  178.    delete(MainChoices,5,1)
  179.    insert(char(0),MainChoiceMask,5)
  180. endif
  181.  
  182. CornerStretchWindow ('Main Menu',MainChoices,11,6)
  183.  
  184. OnKey Mid(MainChoiceMask,1,1)
  185.   |if ExistOnPath('DOLIST.EXE') > ''
  186.      DropTo DoList
  187.   |else
  188.   |  Bat 'DropTo ' + ReadEnv('COMSPEC')
  189.   |endif
  190.  
  191. OnKey Mid(MainChoiceMask,2,1)
  192.   |SelectPrintQueue
  193.   |LastKey = ' '
  194.  
  195. OnKey Mid(MainChoiceMask,3,1)
  196.   |if ExistFile ('Z:' + UserName + '.MNU')
  197.   |   Bat 'Marx ' + UserName
  198.   |endif
  199.  
  200. OnKey Mid(MainChoiceMask,4,1)
  201.   Marx MakeDisk
  202.  
  203. OnKey Mid(MainChoiceMask,5,1)
  204.   ^Maint
  205.  
  206. OnKey Mid(MainChoiceMask,6,1)
  207.   |SelectFormat
  208.   |LastKey = ' '
  209.  
  210. OnKey Mid(MainChoiceMask,7,1)
  211.   ^Dos
  212.  
  213. OnKey Mid(MainChoiceMask,8,1)
  214.   ^NovUtils
  215.  
  216. OnKey Mid(MainChoiceMask,9,1)
  217.   ^NovInfo
  218.  
  219. OnKey Mid(MainChoiceMask,10,1)
  220.   ^NovUser
  221.  
  222. OnKey Esc
  223.    ^Leave
  224.  
  225. ;----- Dos Menu
  226.  
  227. :Dos
  228.  
  229. DosChoices[1] = 'Memory Map'
  230. DosChoices[2] = 'Free Space'
  231. DosChoices[3] = 'Show Directory'
  232. DosChoices[4] = 'Pick Directory'
  233. DosChoices[5] = 'Directory Master'
  234.  
  235. CornerStretchWindow ('DOS Menu',DosChoices,43,6)
  236.  
  237. OnKey 'A'
  238.    MapMem
  239.    Pause
  240.  
  241. OnKey 'B'
  242.    Free
  243.    Pause
  244.  
  245. OnKey 'C'
  246.    D/W
  247.  
  248. OnKey 'D'
  249.    PD
  250.  
  251. OnKey 'E'
  252.   |if ExistOnPath('DM3.EXE') > ''
  253.      DropTo DM3
  254.   |else
  255.      DropTo DM
  256.   |endif
  257.  
  258.  
  259. ;----- Maintenence Menu
  260.  
  261. :Maint
  262.  
  263. MaintChoices[1] = 'Clean Up Files'
  264. MaintChoices[2] = 'Tape Backup'
  265. MaintChoices[3] = 'Edit Login Menu'
  266. MaintChoices[4] = 'Delete .MRX Files'
  267. MaintChoices[5] = 'Edit this Menu'
  268.  
  269. CornerStretchWindow ('Maintenence Menu',MaintChoices,43,6)
  270.  
  271. OnKey 'A'
  272.    Cleanup
  273.  
  274. OnKey 'B'
  275.    f:
  276.    cd\public\jumbo
  277.    Tape
  278.    |Bat Left(ThisDirectory,2)
  279.    |Bat 'cd ' + ThisDirectory
  280.  
  281. OnKey 'C'
  282.    L:
  283.    me login.mnu
  284.    marxcomp login
  285.    |Bat Left(ThisDirectory,2)
  286.    |Bat 'cd ' + ThisDirectory
  287.  
  288. OnKey 'D'
  289.    whereis *.mrx/d
  290.    L:
  291.    marxcomp login
  292.    |Bat Left(ThisDirectory,2)
  293.    |Bat 'cd ' + ThisDirectory
  294.  
  295. OnKey 'E'
  296.    me %MenuFileName
  297.  
  298.  
  299. ;----- Novell Utilities Menu
  300.  
  301. :NovUtils
  302.  
  303. NovUtilChoices[1] = 'Session Management'
  304. NovUtilChoices[2] = 'File Management'
  305. NovUtilChoices[3] = 'Volume Information'
  306. NovUtilChoices[4] = 'System Configuration'
  307. NovUtilChoices[5] = 'File Server Monitoring'
  308. NovUtilChoices[6] = 'Print Queue Management'
  309. NovUtilChoices[7] = 'Print Job Configurations'
  310. NovUtilChoices[8] = 'Printer Definitions'
  311. NovUtilChoices[9] = 'Folio Help System'
  312.  
  313. CenterStretchWindow ('Novell Utilities',NovUtilChoices,45,16)
  314.  
  315. OnKey 'A'
  316.    Session
  317.  
  318. OnKey 'B'
  319.    Filer
  320.  
  321. OnKey 'C'
  322.    VolInfo
  323.  
  324. OnKey 'D'
  325.    Syscon
  326.  
  327. OnKey 'E'
  328.    FConsole
  329.  
  330. OnKey 'F'
  331.    PConsole
  332.  
  333. OnKey 'G'
  334.    PrintCon
  335.  
  336. OnKey 'H'
  337.    PrintDef
  338.  
  339. OnKey 'I'
  340.    P:Help
  341.  
  342. ;----- Novell Information Menu
  343.  
  344. :NovInfo
  345.  
  346. NovInfoChoices[1]  = 'UserList'
  347. NovInfoChoices[2]  = 'Drive Map'
  348. NovInfoChoices[3]  = 'Current Dir'
  349. NovInfoChoices[4]  = 'Directory Rights'
  350. NovInfoChoices[5]  = 'List Servers'
  351. NovInfoChoices[6]  = 'Who Am I?'
  352. NovInfoChoices[7]  = 'Trustees'
  353. NovInfoChoices[8]  = 'System Time'
  354. NovInfoChoices[9]  = 'ChkVol'
  355. NovInfoChoices[10] = 'Printer Status'
  356.  
  357. CornerStretchWindow ('Novell Information',NovInfoChoices,43,6)
  358.  
  359. OnKey 'A'
  360.    UserList/A
  361.    Echo.
  362.    Pause
  363.  
  364. OnKey 'B'
  365.    Map
  366.    Echo.
  367.    Pause
  368.  
  369. OnKey 'C'
  370.    NDir
  371.    Pause
  372.  
  373. OnKey 'D'
  374.    Rights
  375.    Echo.
  376.    Pause
  377.  
  378. OnKey 'E'
  379.    SList
  380.    Echo.
  381.    Pause
  382.  
  383. OnKey 'F'
  384.    WhoAmI/A
  385.    Echo.
  386.    Pause
  387.  
  388. OnKey 'G'
  389.    TList
  390.    Echo.
  391.    Pause
  392.  
  393. OnKey 'H'
  394.    SysTime
  395.    Echo.
  396.    Pause
  397.  
  398. OnKey 'I'
  399.    ChkVol
  400.    Echo.
  401.    Pause
  402.  
  403. OnKey 'J'
  404.    Capture Show
  405.    Echo.
  406.    Pause
  407.  
  408. ;----- Novell User Menu
  409.  
  410. :NovUser
  411.  
  412. NovUserChoices[1] = 'Change Password'
  413. NovUserChoices[2] = 'Block Messages'
  414. NovUserChoices[3] = 'Receive Messages'
  415. NovUserChoices[4] = 'End Printer Capture'
  416. NovUserChoices[5] = 'Send a Message'
  417. NovUserChoices[6] = 'Lan Assist a User'
  418.  
  419. CenterStretchWindow ('Novell User Menu',NovUserChoices,56,11)
  420.  
  421. OnKey 'A'
  422.    SetPass
  423.  
  424. OnKey 'B'
  425.    CastOff
  426.  
  427. OnKey 'C'
  428.    CastOn
  429.  
  430. OnKey 'D'
  431.    EndCap
  432.  
  433. OnKey 'E'
  434.    |SendMessage
  435.  
  436. OnKey 'F'
  437.    |Bat ('LA ' + PickUser('Lan Assist Who'))
  438.  
  439. ;----- This routines selects a print queue
  440.  
  441. Procedure SelectPrintQueue
  442. var Queue PrnPort QCmd
  443.    CornerStretchWindow ('Print Queues',PrintQueueChoices,43,6)
  444.    Queue = max(ord(ReadKey) - 64,1)
  445.    Queue = UpperCase(PrintQueueChoices[Queue])
  446.    if LastKey = Esc then Return
  447.    CornerStretchWindow ('Port',PortChoices,44,17)
  448.    PrnPort = Char(Ord(ReadKey) - 16)
  449.    if LastKey = Esc then Return
  450.    EraseTopWindow
  451.    ClearScreen
  452.    TextColor Yellow Blue
  453.    Write ' Working '
  454.    ResetColors
  455.    ClearScreenFirst Off
  456.    QCmd = 'Queue=' + Queue + ' C=1 NB NFF TimeOut=5 Local=' + PrnPort
  457.    Execute('Capture ' + QCmd + '>nul')
  458. EndProc
  459.  
  460. ;----- This routines selects floppy disk format
  461.  
  462. Procedure SelectFormat
  463. var Ch Message Option BoxDim
  464.    BoxDim[1] = 30
  465.    BoxDim[2] = 12
  466.    BoxDim[3] = 37
  467.    BoxDim[4] = 4
  468.    DrawStretchWindow('Format Floppy Disk Menu',BoxDim)
  469.    Writeln ' 1 - Format 360    5 - Format /S 360'
  470.    Writeln ' 2 - Format 1.2M   6 - Format /S 1.2M'
  471.    Writeln ' 3 - Format 720    7 - Format /S 720'
  472.    Write   ' 4 - Format 1.4M   8 - Format /S 1.4M'
  473.    Ch = ReadKey
  474.    if Ch = '1'
  475.       Message = '360k Format with no System Files.'
  476.       Option = '/4'
  477.    endif
  478.    if Ch = '2'
  479.       Message = '1.2m Format with no System Files.'
  480.       Option = ''
  481.    endif
  482.    if Ch = '3'
  483.       Message = '720k Format with no System Files.'
  484.       Option = '/N:9/T:80'
  485.    endif
  486.    if Ch = '4'
  487.       Message = '1.4m Format with no System Files.'
  488.       Option = '/N:18/T:80'
  489.    endif
  490.    if Ch = '5'
  491.       Message = '360k Format with System Files.'
  492.       Option = '/4/S'
  493.    endif
  494.    if Ch = '6'
  495.       Message = '1.2m Format with System Files.'
  496.       Option = '/S'
  497.    endif
  498.    if Ch = '7'
  499.       Message = '720k Format with System Files.'
  500.       Option = '/N:9/T:80/S'
  501.    endif
  502.    if Ch = '8'
  503.       Message = '1.4m Format with System Files.'
  504.       Option = '/N:18/T:80/S'
  505.    endif
  506.    if Message = '' then Return
  507.    BoxDim[1] = 56
  508.    BoxDim[2] = 18
  509.    BoxDim[3] = 5
  510.    BoxDim[4] = 2
  511.    DrawStretchWindow('Drive',BoxDim)
  512.    Writeln '  A:'
  513.    Write   '  B:'
  514.    Ch = ReadKey
  515.    if Ch = Esc then Return
  516.    if Ch = 'A'
  517.       Bat '@Echo Formatting Drive A: ' + Message
  518.       Bat '@Echo To abort, press CTRL-C.'
  519.       Bat '@Echo .'
  520.       Bat 'FORMAT A:' + Option
  521.    endif
  522.    if Ch = 'B'
  523.       Bat '@Echo Formatting Drive B: ' + Message
  524.       Bat '@Echo To abort, press CTRL-C.'
  525.       Bat '@Echo .'
  526.       Bat 'FORMAT B:' + Option
  527.    endif
  528. EndProc
  529.  
  530.  
  531. Procedure SendMessage
  532. var BoxDim Choice Message
  533.    Choice = PickUser('Send message To')
  534.    BoxDim[1] = 14
  535.    BoxDim[2] = 23
  536.    BoxDim[3] = 52
  537.    BoxDim[4] = 1
  538.    DrawStretchWindow('Enter the Message that you Wish to Send',BoxDim)
  539.    Write ' '
  540.    Message = Readln
  541.    if LastKey = Esc then Return
  542.    ClearScreen
  543.    TextColor Yellow Blue
  544.    Write ' Sending ... '
  545.    ClearScreenFirst Off
  546.    Execute 'Send "' + Message + '" to ' + Choice + '>nul'
  547.    ResetColors
  548. EndProc
  549.  
  550.  
  551. ;------ Reset Colors Procedure
  552.  
  553. Procedure ResetColors
  554.    if ColorScreen
  555.       BoxBorderColor Yellow Blue
  556.       BoxInsideColor Yellow Blue
  557.       CapsColor White Blue
  558.       InverseColor White Mag
  559.    else
  560.       BoxBorderColor Grey Black
  561.       BoxInsideColor Grey Black
  562.       CapsColor White Black
  563.    endif
  564. EndProc
  565.  
  566. ;----- This routines is used to actually draw the stretch window
  567.  
  568. Procedure DrawStretchWindow (Title,BoxDim)
  569.    Explode On
  570.    DoubleLineBox
  571.    DrawBox (BoxDim[1] - 2, BoxDim[2] - 3 ,BoxDim[3] + 6, BoxDim[4] + 4)
  572.    TextColor LCyan Blue
  573.    WriteCenter Title
  574.    TextColor LGreen Blue
  575.    Writeln
  576.    ClearLine 196
  577.    GotoXY 2 2
  578.    WriteVertical mid(VertLine,1,BoxDim[4] + 1)
  579.    ResetColors
  580.    Explode Off
  581.    NoBoxBorder
  582.    Window (BoxDim[1] + 1, BoxDim[2], BoxDim[3] + 2, BoxDim[4])
  583.    DoubleLineBox
  584.    Explode On
  585. EndProc
  586.  
  587. ;----- The X Y parameters are the center of the box
  588.  
  589. Procedure CenterStretchWindow (Title, Choices, X, Y)
  590. var Longest BoxDim NumElem C
  591.    Longest = length(Title) - 2
  592.    NumElem = NumberOfElements(Choices)
  593.    C = 64
  594.    Loop NumElem
  595.       Choices[LoopIndex] = Char(C + LoopIndex) + ' - ' + Choices[LoopIndex]
  596.       Longest = Max(Longest,length(Choices[LoopIndex]))
  597.    EndLoop
  598.    BoxDim[1] = X - (Longest / 2) - 1
  599.    BoxDim[2] = Y - (NumElem / 2) + 1
  600.    BoxDim[3] = Longest
  601.    BoxDim[4] = NumElem
  602.    DrawStretchWindow(Title,BoxDim)
  603.    Loop NumElem
  604.       Write ' ' Choices[LoopIndex]
  605.       if LoopIndex < NumElem then Writeln
  606.    EndLoop
  607. EndProc
  608.  
  609. ;----- The X Y parameters are the corner of the box
  610.  
  611. Procedure CornerStretchWindow (Title, Choices, X, Y)
  612. var Longest BoxDim NumElem C
  613.    Longest = length(Title) - 2
  614.    NumElem = NumberOfElements(Choices)
  615.    C = 64
  616.    Loop NumElem
  617.       Choices[LoopIndex] = Char(C + LoopIndex) + ' - ' + Choices[LoopIndex]
  618.       Longest = Max(Longest,length(Choices[LoopIndex]))
  619.    EndLoop
  620.    BoxDim[1] = X + 2
  621.    BoxDim[2] = Y + 3
  622.    BoxDim[3] = Longest
  623.    BoxDim[4] = NumElem
  624.    DrawStretchWindow(Title,BoxDim)
  625.    Loop NumElem
  626.       Write ' ' Choices[LoopIndex]
  627.       if LoopIndex < NumElem then Writeln
  628.    EndLoop
  629. EndProc
  630.  
  631. ;----- Recursive QuickSort
  632.  
  633. Procedure SortUsers (L,R)
  634. var I J Middle
  635.    I = L
  636.    J = R
  637.    Middle = AllUsers[(L+R)/2]
  638.    repeat
  639.       while AllUsers[I] < Middle
  640.          I = I + 1
  641.       endwhile
  642.       while Middle < AllUsers[J]
  643.          J = J - 1
  644.       endwhile
  645.       if I <= J
  646.          Middle = AllUsers[J]
  647.          AllUsers[J] = AllUsers[I]
  648.          AllUsers[I] = Middle
  649.          I = I + 1
  650.          J = J - 1
  651.       endif
  652.    until I > J
  653.    if (J - L) < (R - I)
  654.       if L < J then SortUsers(L,J);
  655.       if I < R then SortUsers(I,R);
  656.    else
  657.       if I < R then SortUsers(I,R);
  658.       if L < J then SortUsers(L,J);
  659.    endif
  660. EndProc
  661.  
  662. ;----- Reads a list of all users on the system
  663.  
  664. Procedure ReadUsers
  665. var I Name
  666.    if UsersRead then Return
  667.    I = 1
  668.    Loop 20
  669.       Name = NovLoginName (LoopIndex)
  670.       if (Name > '') and (Name <> MyServer)
  671.          AllUsers[I] = Name
  672.          I = I + 1
  673.       endif
  674.    EndLoop
  675.    SortUsers(1,NumberOfElements(AllUsers))
  676.    UsersRead = True
  677. EndProc
  678.  
  679. Procedure PickUser (Message)
  680. var BoxDim
  681.    ReadUsers
  682.    BoxDim[1] = 32
  683.    BoxDim[2] = 14
  684.    BoxDim[3] = 17
  685.    BoxDim[4] = Min(8,NumberOfElements(AllUsers))
  686.    DrawStretchWindow(Message,BoxDim)
  687.    Return PickOne(AllUsers)
  688. EndProc
  689.  
  690. ;------ MenuExit Procedure
  691.  
  692. :Leave
  693.    Explode On
  694.    DrawBox 36 11 13 6
  695.    TextColor LCyan Blue
  696.    WriteCenter "Exit Menu"
  697.    TextColor LGreen Blue
  698.    Writeln
  699.    ClearLine 196
  700.    GotoXY 2 2
  701.    WriteVertical mid(VertLine,1,3)
  702.    ResetColors
  703.    Explode Off
  704.    NoBoxBorder
  705.    DrawBox 39 14 9 2
  706.    Writeln " Yes"
  707.    Write   " No"
  708.    DoubleLineBox
  709.    OnKey "Y"
  710.       |ExitMenu
  711.  
  712.    OnKey "N"
  713.       |LastKey = Esc
  714.  
  715.